CC:=gcc

pthread_creat_test: pthread_creat_test.c
	$(CC) -o $@ $^ -lrt -pthread
	-./$@
	-rm -rf $@

terminate_test: terminate_test.c
	$(CC) -o $@ $^ -lrt -pthread
	-./$@
	-rm -rf $@

pthread_detach: pthread_detach.c
	$(CC) -o $@ $^ -lrt -pthread
	-./$@
	-rm -rf $@

pthread_cancel: pthread_cancel.c
	$(CC) -o $@ $^ -lrt -pthread
	-./$@
	-rm -rf $@

race_pthread: race_pthread.c
	$(CC) -o $@ $^ -lrt -pthread
	-./$@
	-rm -rf $@

pthread_rwlock_test: pthread_rwlock_test.c
	$(CC) -o $@ $^ -lrt -pthread
	-./$@
	-rm -rf $@

cond_var_test: cond_var_test.c
	$(CC) -o $@ $^ -lrt -pthread
	-./$@
	-rm -rf $@
